YouTube Music -> OBS "Now Playing" overlay
==========================================

You need: Windows 10/11 and Node.js (https://nodejs.org, the LTS version).

METHOD A - for the installed YouTube Music app (recommended)
-------------------------------------------------------------
1) Double-click start.bat
   It opens two windows: "relay" and "watcher". Leave both open while you stream.
2) Play a song in the YouTube Music app.
   The watcher window should print "Now playing: ..." (and which app it read from).
3) In OBS add a "Browser" source:
     URL:    http://localhost:26539/overlay.html
     Size:   match your canvas (e.g. 1920 x 1080)
     Tip:    add ?seconds=8 to the URL to change how long the card stays up

By default the watcher only reads the YouTube Music app (app id cinhimbnkkghhklpknlkffjgod),
so other Chrome tabs or apps playing media are ignored. To read a different app, run it by
hand with a filter, e.g.:
   powershell -ExecutionPolicy Bypass -File relay\media-watcher.ps1 -AppFilter spotify
Use -All to read whichever app Windows treats as current.

If the watcher window says "Problem: ...", the relay window probably isn't running.

RUN AUTOMATICALLY (no windows, nothing to open)
-----------------------------------------------
start-hidden.vbs starts the relay and watcher silently.
1) Press Win+R, type  shell:startup  and press Enter. A folder opens.
2) Right-click start-hidden.vbs > Show more options > Create shortcut,
   then drag that shortcut into the Startup folder.
It now runs every time you log in to Windows; OBS just needs the Browser source.
To test it without restarting, double-click start-hidden.vbs.
To stop it, double-click stop.bat.
(Use either start.bat or start-hidden.vbs, not both at once.)

METHOD B - only if you play in a normal Chrome tab
---------------------------------------------------
Load the "extension" folder at chrome://extensions (Developer mode > Load unpacked),
refresh the YouTube Music tab, and run only the relay (node server.js in the relay folder).
Do NOT use Method A and Method B at the same time, or the popup will appear twice.

Customising
-----------
Look and position: edit the CSS in relay/overlay.html.
